# coding:utf-8
# writingtime: 2022-8-2
# reference: https://doi.org/10.1007/s40815-021-01243-2

from partition import PartitionCoefficient


class MPC:
    @staticmethod
    def getresult(dataList, membershipMatrix, clusterCenter, m=2, a=2):
        """
        function: MaximumPartitionCoefficient评价函数
        :param membershipMatrix: 评价矩阵
        :param a: 评价函数的参数
        :return: MaximumPartitionCoefficient评价系数
        """
        coefficient = 1 - (a / (a - 1)) * PartitionCoefficient.getresult(membershipMatrix)

        return coefficient
